import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Window 2.0
import "./UI/LeftPanel"

ApplicationWindow {
    visible: true
    width: Screen.desktopAvailableWidth*4/5
    height: Screen.desktopAvailableHeight*4/5
    minimumWidth: 1500
    minimumHeight: 900
    title: qsTr("乙烯裂解炉管外表面温度监测与智能分析系统")

    //默认参数设置
        property int aler_tube_in_temp;
        property int aler_tube_out_temp;
        property int aler_tube_cot_temp;
        property int aler_gap_temp;

    id:mainwin
    Component.onCompleted: {
        showMaximized();
//        最大尺寸显示
//        qDebug()<<"入管警戒温度"<<query.value(1).toInt();
//        qDebug()<<"出警戒温度"<<query.value(2).toInt();
//        qDebug()<<"COT警戒温度"<<query.value(3).toInt();
//        qDebug()<<"管间警戒温度差"<<query.value(4).toInt();
        aler_tube_in_temp=server.get_aler_temps_value(0)
        aler_tube_out_temp=server.get_aler_temps_value(1)
        aler_tube_cot_temp=server.get_aler_temps_value(2)
        aler_gap_temp=server.get_aler_temps_value(3)
    }

    LeftPanel{
        width: 150
        height:parent.height
        id:leftPanel
        z:2
        onDataImportClicked: {
            loader.source="qrc:/UI/RightView/DataImportPage.qml"
        }
        onFullSearchClicked: {
            loader.source="qrc:/UI/RightView/FullSearchPage.qml"
        }
        onCompareClicked: {
            loader.source="qrc:/UI/RightView/FullComparePage.qml"
        }
        onAnalyClicked: {
            loader.source="qrc:/UI/RightView/AnalistyPage.qml"
        }
        onSettingClicked: {
            loader.source="qrc:/UI/RightView/SettingPage.qml"
        }
        onVersionClicked: {
            loader.source="qrc:/UI/RightView/VersionPage.qml"
        }
    }
    Loader{
        width: parent.width-leftPanel.width
        height:parent.height
        anchors.right: parent.right
        id:loader
        source:"qrc:/UI/RightView/DataImportPage.qml"
        asynchronous: true
//        开启异步加载
        visible: status == Loader.Ready
    }

}

